package domain;

import lombok.Data;
import model.data.Point;

import java.util.LinkedList;
import java.util.List;

/**
 * @author 刀氏春秋
 * @date 2023/5/15
 */
@Data
public class RawDataDO {
    private String assetNo;
    private String hplcPhase;
    private String wiringMode;
    private List<Point> points;

    /**
     * 在点列表后加入新点
     *
     * @param toBeAdded 待加入的新点
     */
    public void appendList(List<Point> toBeAdded) {
        if (points == null) points = new LinkedList<>();
        this.points.addAll(toBeAdded);
    }

    @Override
    public String toString() {
        return String.format("(assetNo = %s, hplcPhase = %s, wiringMode = %s)", this.assetNo, this.hplcPhase, this.wiringMode);
    }
}
